﻿<entities>
  <globalsettings>
    <defaultMapLocation Center="40.780, -100.112" ZoomLevel="4" />
    <nearDistanceUnit value="miles" />
  </globalsettings>
  <entity name="account" displayname="Account">
    <fetchXml>
      <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
        <entity name="account">
          <attribute name="name" />
          <attribute name="address1_city" />
          <attribute name="primarycontactid" />
          <attribute name="address1_latitude" />
          <attribute name="address1_longitude" />
          <attribute name="websiteurl" />
          <attribute name="address1_country" />
          <attribute name="revenue" />
          <attribute name="description" />
          <order attribute="name" descending="false" />
          <filter type="and">
            <condition attribute="statecode" operator="eq" value="0" />
            {0}
            {1}
          </filter>
          <link-entity name="contact" from="contactid" to="primarycontactid" visible="false" link-type="outer" alias="accountprimarycontactidcontactcontactid">
            <attribute name="emailaddress1" />
          </link-entity>
        </entity>
      </fetch>
    </fetchXml>
    <address>
      <latitude name="address1_latitude"></latitude>
      <longitude name="address1_longitude"></longitude>
    </address>
    <Conditions>
      <mapcondition text="Name Contains: ">
        <condition attribute="name" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
      <mapcondition text="City: ">
        <condition attribute="address1_city" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
    </Conditions>
    <displaypanel>
      <links>
        <link text="Website">
          <field name="websiteurl"></field>
        </link>
      </links>
      <list>
        <listitem text="Name">
          <field name="name"></field>
        </listitem>
        <listitem text="City">
          <field name="address1_city"></field>
        </listitem>
        <listitem text="Country">
          <field name="address1_country"></field>
        </listitem>
        <listitem text="Revenue">
          <field name="revenue"></field>
        </listitem>
        <listitem text="Description">
          <field name="description"></field>
        </listitem>
      </list>
      <tooltip text="Account Pushpin">
        <field name="name"></field>
        <color name="blue"></color>
        <zoomlevel name="10"></zoomlevel>
      </tooltip>
    </displaypanel>
  </entity>
  <entity name="account" displayname="Customer">
    <fetchXml>
      <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
        <entity name="account">
          <attribute name="name" />
          <attribute name="address1_city" />
          <attribute name="primarycontactid" />
          <attribute name="address1_latitude" />
          <attribute name="address1_longitude" />
          <attribute name="websiteurl" />
          <attribute name="address1_country" />
          <attribute name="revenue" />
          <attribute name="description" />
          <order attribute="name" descending="false" />
          <filter type="and">
            <condition attribute="statecode" operator="eq" value="1" />
            {0}
            {1}
          </filter>
          <link-entity name="contact" from="contactid" to="primarycontactid" visible="false" link-type="outer" alias="accountprimarycontactidcontactcontactid">
            <attribute name="emailaddress1" />
          </link-entity>
        </entity>
      </fetch>
    </fetchXml>
    <address>
      <latitude name="address1_latitude"></latitude>
      <longitude name="address1_longitude"></longitude>
    </address>
    <Conditions>
      <mapcondition text="Name Contains: ">
        <condition attribute="name" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
      <mapcondition text="City: ">
        <condition attribute="address1_city" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
    </Conditions>
    <displaypanel>
      <links>
        <link text="Website">
          <field name="websiteurl"></field>
        </link>
      </links>
      <list>
        <listitem text="Name">
          <field name="name"></field>
        </listitem>
        <listitem text="City">
          <field name="address1_city"></field>
        </listitem>
        <listitem text="Country">
          <field name="address1_country"></field>
        </listitem>
        <listitem text="Revenue">
          <field name="revenue"></field>
        </listitem>
        <listitem text="Description">
          <field name="description"></field>
        </listitem>
      </list>
      <tooltip text="Account Pushpin">
        <field name="name"></field>
        <color name="green"></color>
        <zoomlevel name="10"></zoomlevel>
      </tooltip>
    </displaypanel>
  </entity>
  <entity name="contact" displayname="Contact">
    <fetchXml>
      <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
        <entity name="contact">
          <attribute name="fullname" />
          <attribute name="telephone1" />
          <attribute name="emailaddress1" />
          <attribute name="address1_latitude" />
          <attribute name="address1_longitude" />
          <attribute name="address1_city" />
          <attribute name="address1_country" />
          <attribute name="websiteurl" />
          <attribute name="description" />
          <order attribute="fullname" descending="false" />
          <filter type="and">
            <condition attribute="statecode" operator="eq" value="0" />
            {0}
            {1}
            {2}
          </filter>
        </entity>
      </fetch>
    </fetchXml>
    <address>
      <latitude name="address1_latitude"></latitude>
      <longitude name="address1_longitude"></longitude>
    </address>
    <Conditions>
      <mapcondition text="City: ">
        <condition attribute="address1_city" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
      <mapcondition text="Fullname: ">
        <condition attribute="fullname" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
      <mapcondition text="Business phone contains: ">
        <condition attribute="telephone1" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
    </Conditions>
    <displaypanel>
      <links>
        <link text="Website">
          <field name="websiteurl"></field>
        </link>
      </links>
      <list>
        <listitem text="Name">
          <field name="fullname"></field>
        </listitem>
        <listitem text="City">
          <field name="address1_city"></field>
        </listitem>
        <listitem text="Country">
          <field name="address1_country"></field>
        </listitem>
        <listitem text="Description">
          <field name="description"></field>
        </listitem>
      </list>
      <tooltip text="Contact Pushpin">
        <field name="fullname"></field>
        <color name="red"></color>
        <zoomlevel name="10"></zoomlevel>
      </tooltip>
    </displaypanel>
  </entity>
</entities>
